#ifndef __LIB_AGORA_ADMIN_CHANNEL_H__
#define __LIB_AGORA_ADMIN_CHANNEL_H__

#include "IChannel.h"

class	Channel : public IChannel
{
public:
	//Channel(const unsigned int id, const std::string& name, const unsigned int maxNameLenght, const std::string& password, const unsigned int maxPasswordLenght, const std::string& motd, const unsigned int maxMotdLenght, const std::string& description, const unsigned int maxDescriptionLenght, const bool visible, const unsigned int maxUser, const unsigned int maxTalker);
	Channel(const unsigned int id, IChannel* parent, const std::string& name, const unsigned int maxNameLenght, const std::string& password, const unsigned int maxPasswordLenght, const std::string& motd, const unsigned int maxMotdLenght, const std::string& description, const unsigned int maxDescriptionLenght, const bool visible, const unsigned int maxUser, const unsigned int maxTalker);
	~Channel(void);

	const unsigned int	GetId(void) const;
	const unsigned int	SetId(const unsigned int id);
	IChannel*			GetParent(void) const;
	const unsigned int	SetParent(IChannel* parent);
	//const unsigned int	SetParent(const unsigned int id);
	//const unsigned int	SetParent(const std::string& pattern);
	//const unsigned int	UnSetParent(void);
	const bool			HaveParent(void) const;
	const std::string&	GetName(void) const;
	const unsigned int	SetName(const std::string& name);
	const unsigned int	GetMaxNameLength(void) const;
	const unsigned int	SetMaxNameLength(const unsigned int length, bool recurcive);
	const std::string&	GetPassword(void) const;
	const unsigned int	SetPassword(const std::string& password, bool recurcive);
	const unsigned int	GetMaxPasswordLength(void) const;
	const unsigned int	SetMaxPasswordLength(const unsigned int length, bool recurcive);
	const std::string&	GetMotd(void) const;
	const unsigned int	SetMotd(const std::string& motd, bool recurcive);
	const unsigned int	GetMaxMotdLength(void) const;
	const unsigned int	SetMaxMotdLength(const unsigned int length, bool recurcive);
	const std::string&	GetDescription(void) const;
	const unsigned int	SetDescription(const std::string& description, bool recurcive);
	const unsigned int	GetMaxDescriptionLength(void) const;
	const unsigned int	SetMaxDescriptionLength(const unsigned int length, bool recurcive);
	const bool			GetVisibility(void) const;
	const unsigned int	SetVisibility(const bool visible, bool recurcive);
	const unsigned int	GetMaxUser(void) const;
	const unsigned int	SetMaxUser(const unsigned int limit, bool recurcive);
	const unsigned int	GetMaxTalker(void) const;
	const unsigned int	SetMaxTalker(const unsigned int limit, bool recurcive);

	const unsigned int					DeleteChannel(void);
	const unsigned int					AddChannelChild(IChannel* channel);
	const unsigned int					RemoveChannelChild(IChannel* channel);
	//std::list<IChannel*>&				GetChannelChild(void) const;
	std::list<IChannel*>*				GetChannelChild(void);
	const unsigned int					AddUser(IUser* user);
	const unsigned int					RemoveUser(IUser* user);
	const unsigned int					SubscribeUser(IUser*, IChannelRight*);
	const unsigned int					UnSubscribeUser(IUser*);
	//std::list<IUser*>&					GetUser() const;
	std::list<IUser*>*					GetUser();

private:
	unsigned int			_id;
	IChannel*				_parent;
	std::string				_name;
	unsigned int			_maxNameLenght;
	std::string				_password;
	unsigned int			_maxPasswordLenght;
	std::string				_motd;
	unsigned int			_maxMotdLenght;
	std::string				_description;
	unsigned int			_maxDescriptionLenght;
	bool					_visible;
	unsigned int			_maxUser;
	unsigned int			_maxTalker;
	std::list<IChannel*>	_child;
	std::list<IUser*>		_user;
};

#endif